//
//  GAToolsViewController.m
//  Gunterapple
//
//  Created by 热带雨林 on 2021/1/22.
//  Copyright © 2021 热带雨林. All rights reserved.
//

#import "GAToolsViewController.h"
#import <DKNightVersion.h>
@interface GAToolsViewController ()

@end

@implementation GAToolsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"Tools";
    
    self.view.dk_backgroundColorPicker = DKColorPickerWithKey(BG);

    UIButton *lightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [lightBtn setTitle:@"正常/暗夜" forState:UIControlStateNormal];
    [lightBtn dk_setTitleColorPicker:DKColorPickerWithKey(textColor) forState:UIControlStateNormal];
    [lightBtn addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:lightBtn];
    
    [lightBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.center.equalTo(self.view);
        make.width.mas_equalTo(200);
        make.height.mas_equalTo(70);
    }];
}

- (void)click:(UIButton *)sender{
    sender.selected = !sender.selected;
    if(sender.selected){
        self.dk_manager.themeVersion = DKThemeVersionNight;
    }else{
        self.dk_manager.themeVersion = DKThemeVersionNormal;
    }
}



@end
